package cn.thoughtworks.school.programCenter.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;


@FeignClient(name = "${feign.diffCenter.name}",
    url = "${feign.diffCenter.url}")
@Service
public interface DiffCenterFeign {
    @PostMapping("api/diff/programs")
    void updateProgramNotification(@RequestBody Map data);

    @PostMapping("api/diff/topics")
    void updateTopicNotification(@RequestBody Map data);

    @PostMapping("api/diff/tasks")
    void updateTaskNotification(@RequestBody Map data);

    @PostMapping("api/diff/assignments")
    void updateAssignmentsNotification(@RequestBody List<Map> data);

    @PostMapping("api/diff/tasks/movement")
    void moveTaskNotification(@RequestBody List<Map> tasks);
}
